
/*****************************************************************************
 *
 * 作   者: 伍建平 * 创建时间: 2022/11/24 10:42:02 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';

/**
 * 征信加减分规则表
 */
export class CreditRule extends DataPacket {
  Id: string; // id
  Type: string; // 类型
  Description: string; // 描述
  Score: number; // 分数
  CreateTime: Date|undefined; // 创建时间
  UpdateTime: Date|undefined; // 修改时间

  constructor(options: Partial<CreditRule> = {}) {
    super();
    this.Id = options.Id || '';
    this.Type = options.Type || '';
    this.Description = options.Description || '';
    this.Score = !options.Score ? 0 : Number.parseFloat(options.Score.toString());
    this.CreateTime = this.newDate(options.CreateTime);
    this.UpdateTime = this.newDate(options.UpdateTime);
  }
}

/**
 * 征信加减分规则表列表
 */
export class CreditRuleList extends NorDataList<CreditRule> {

  constructor(options: Partial<CreditRuleList> | Array<CreditRule> = {}) {
    super(options, CreditRule);
  }
}

